<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://www.springmodules.org/tags/commons-validator" prefix="validator" %>
<%@ page isELIgnored="false"%>  
<html>

<head>
	<title>Register User</title>
	<validator:javascript formName="registerCommand" dynamicJavascript="true"/> 	
</head>

<body>

<form name="RegisterUserForm" method="post" action="/registerUser.do" onsubmit="return validateRegisterCommand(this)">

<table height="40%" width="100%" >
	<tr valign="middle">
		<td>
			<table align="center">
			<tr>	
				<td>
					<spring:message code="lab.userid" text="UserId" />:
				</td>		
				<td><form:input path="user.userId" maxlength="20"/>&nbsp;<font color="red">*</font>
				<form:errors path="user.userId" cssClass="error"/></td>		
			</tr>
			<tr>	
				<td>
				</td>		
				<td>请确保为5-20个字符。</td>
			</tr>
			<tr>	
				<td colspan="2">&nbsp;</td>	
			</tr>			
			<tr>	
				<td>
					<spring:message code="lab.password" text="Password" />:
				</td>
				<td><form:input path="user.password" maxlength="20"/>&nbsp;<font color="red">*</font>
				<form:errors path="user.password" cssClass="error"/></td>
			</tr>
			<tr>	
				<td>
				</td>		
				<td>请确保为3-20个字符。</td>		
			</tr>
			<tr>	
				<td colspan="2">&nbsp;</td>	
			</tr>
			<tr>	
				<td>
					<spring:message code="lab.name" text="Name" />:
				</td>		
				<td><form:input path="user.name" maxlength="50"/>
				<form:errors path="user.name" cssClass="error"/></td>		
			</tr>
			<tr>	
				<td>
				</td>		
				<td>最多50个字符。</td>
			</tr>
			<tr>	
				<td colspan="2">&nbsp;</td>	
			</tr>			
			<tr>	
				<td>
					<spring:message code="lab.mailAddress" text="e-mail" />:
				</td>		
				<td><form:input path="user.mailAddress" maxlength="50"/>
				<form:errors path="user.mailAddress" cssClass="error"/>	</td>
			</tr>
			<tr>	
				<td>
				</td>		
				<td>最多50个字符。</td>
			</tr>
			<tr>	
				<td colspan="2">&nbsp;</td>	
			</tr>			
		</table>
	</td>
	</tr>
	
	<tr>
	<td>
		<table height="10%" align="center">	
			<tr>	
				<td>
					<input id="submitButton" name="submitButton" type="submit" value="提交" />
					<input type="button" value="返回" onclick="window.location = '/indexJSP.do';"/>
				</td>
			</tr>
		</table>	
	</td>
	</tr>	
</table>	

</form>
</body>
</html>